/*
 * CKernel.cpp
 *
 *  Created on: 29.11.2011
 *      Author: kirill
 *      Copyright: LGPL
 */

#include "CKernel.h"
#include "../Constants.h"
#include "../StructSource.h"
#include "SDL/SDL.h"

const char GUI_TEMPLATES_PATH[] = "./ShablonsGUI/Shablon.txt";

CKernel::CKernel()
{

}

CKernel::~CKernel()
{

}

void
CKernel::RunEngine()
{
	visualisator = new CVisualisator();

	dimension.width = WINDOW_WIDTH;
	dimension.height = WINDOW_HEIGHT;
	dimension.multisampleBufferCount = 4;
	dimension.sdlFlags = SDL_HWSURFACE | SDL_OPENGL;

	//Initialize window
	visualisator->SetDimension( dimension );
	//Reserved for future function
	visualisator->ConfigVisualisation();

	//Create resource manager
	resourceManager = new CManagerResource();

	//Create Gui
	guiManager = new CManagerGUI();
	guiManager->Init( GUI_TEMPLATES_PATH, "" );//TODO Fill FileControl parameter
}

void
CKernel::KillEngine()
{

}
